home *** CD-ROM | disk | FTP | other *** search
- 123
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- FilePermissions
- --- RECORDSEPARATOR ---
- Platform:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Macintosh
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Description:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- baFilePermissions returns the UNIX permissions of a file or folder.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Usage:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Result = baFilePermissions( FileName, User )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Arguments:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- String, string.
- --- RECORDSEPARATOR ---
- FileName is the file to get the attribute of.
- --- RECORDSEPARATOR ---
- User is the user type to get. Can be one of:
- --- RECORDSEPARATOR ---
- "u"
- --- RECORDSEPARATOR ---
- the present user
- --- RECORDSEPARATOR ---
- "g"
- --- RECORDSEPARATOR ---
- the current group
- --- RECORDSEPARATOR ---
- "o"
- --- RECORDSEPARATOR ---
- all other users
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Returns:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- String.
- --- RECORDSEPARATOR ---
- Returns a string containing all the file permissions that are set.
- --- RECORDSEPARATOR ---
- Can be a combination of:
- --- RECORDSEPARATOR ---
- "r"
- --- RECORDSEPARATOR ---
- read access allowed
- --- RECORDSEPARATOR ---
- "w"
- --- RECORDSEPARATOR ---
- write access allowed
- --- RECORDSEPARATOR ---
- "x"
- --- RECORDSEPARATOR ---
- execute access allowed
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Examples:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Director:
- --- RECORDSEPARATOR ---
- perm = baFilePermissions( "Mac HD:data:student.dat", "u" )
- --- RECORDSEPARATOR ---
- Authorware:
- --- RECORDSEPARATOR ---
- perm := baFilePermissions( "Mac HD:data:student.dat", "u" )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Notes:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- This function only works under OSX.
- --- RECORDSEPARATOR ---
- You can use the Director contains or Authorware Find functions to test whether a
- --- RECORDSEPARATOR ---
- particular attribute is set. eg.
- --- RECORDSEPARATOR ---
- if Find( "r", baFilePermissions( File ) ) <> 0 then -- file has read access
- --- RECORDSEPARATOR ---
- if baFilePermissions( Filename ) contains "r" then -- file has read access
- --- RECORDSEPARATOR ---
- To get the permissions of a folder, you need to make sure that the folder name
- --- RECORDSEPARATOR ---
- ends with a :